BINUTILS="binutils-2.23.1"
echo "This script will compare ${BINUTILS}.tar.bz2"
if [ ! -d ${BUILDDIR}/${BINUTILS} ];then
	tar jvxf ${DOWNLOADDIR}/${BINUTILS}.tar.bz2  -C ${BUILDDIR}
fi
pushd ${BUILDDIR}/${BINUTILS}
mkdir -pv ../binutils-build
cd ../binutils-build
CC="gcc -B/usr/bin/"
../${BINUTILS}/configure --prefix=/tools --disable-nls --disable-werror
if [ "$?" != "0" ];then
	echo "|||error:when configure ../${BINUTILS}/configure!  |||"
	exit 125
fi
make
if [ "$?" != "0" ];then
	echo "|||error:when run command 'make'  |||"
	exit 125
fi
make install
if [ "$?" != "0" ];then
	echo "|||error:when run command 'make install'  |||"
	exit 125
fi
make -C ld clean
if [ "$?" != "0" ];then
	echo "|||error:when run command 'make -C ld clean'  |||"
	exit 125
fi
make -C ld LIB_PATH=/tools/lib
if [ "$?" != "0" ];then
	echo "|||error:when run command 'make  -C ld LIB_PATH=/tools/lib'  |||"
	exit 125
fi
cp -v ld/ld-new /tools/bin
pwd
cd ..
pwd
rm -rf binutils-build
rm -rf ${BINUTILS}
popd
